package com.hmy.finance.api.enums;

/**
 * 收款核销审批节点枚举
 *
 * @author wenjian
 */
public enum ReceiptOffsetApprovalNodeEnum {
    /**
     * 区域经理审批节点
     */
    AREA_MANAGER("AREA_MANAGER", "区域经理"),
    
    /**
     * 出纳会计审批节点
     */
    CASHIER("CASHIER", "出纳会计"),
    
    /**
     * 应收会计审批节点
     */
    ARACCOUNTANT("ARACCOUNTANT", "应收会计"),
    ;

    private String code;
    private String desc;

    ReceiptOffsetApprovalNodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public static ReceiptOffsetApprovalNodeEnum getEnumByValue(String code){
        ReceiptOffsetApprovalNodeEnum[] enums = ReceiptOffsetApprovalNodeEnum.values();
        for(ReceiptOffsetApprovalNodeEnum receiptOffsetApprovalNodeEnum : enums){
            if(receiptOffsetApprovalNodeEnum.code.equals(code)){
                return receiptOffsetApprovalNodeEnum;
            }
        }
        return null;
    }
}
